<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>优惠券管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/trip/tTrip/">行程顾问列表</a></li>
		<li ><a href="${ctx}/trip/tTrip/meals">套餐设置</a></li>
	</ul>
	 <form:form id="searchForm" modelAttribute="TripCounselorInfo" action="${ctx}/trip/tTrip/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<ul class="ul-form">
			 <li> <label>出发地：</label>
				<input name="departCity"  maxlength="50"  class="input-medium"/></li>
			<li><label>状态：</label>
			  <select name="payState" class="input-medium">
				<option value="" >--请选择--</option>
				<option value="0" <c:if test="${ '0' eq TripCounselorInfo.payState}">selected="selected"</c:if>>未支付</option>
				<option value="1" <c:if test="${ '1' eq TripCounselorInfo.payState}">selected="selected"</c:if>>已支付</option>
				<option value="2" <c:if test="${ '2' eq TripCounselorInfo.payState}">selected="selected"</c:if>>已取消</option>
			  </select></li>
			 <li> <label>发布人：</label>
				<input name="linkMan"  maxlength="50"  class="input-medium"/></li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li clas="clearfix"></li>
			</ul>
	</form:form>
	<sys:message content="${message}"/>
	
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>发布人</th>
				<th>发布时间</th>
				<th>套餐类型</th>
				<th>人数</th>
				<th>出发地</th>
				<th>金额</th>
				<th>支付状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<c:forEach items="${page.list}" var="TripCounselorInfo">
			<tr>
				<td>${TripCounselorInfo.linkMan}</td>
				<td><fmt:formatDate value="${TripCounselorInfo.departTime}" pattern="yyyy-MM-dd" /></td>
				<td>${TripCounselorInfo.setmeal == '0'?'基础套餐':'高级套餐'} </td>
				<td>${TripCounselorInfo.countPerson }</td>
				<td>${TripCounselorInfo.departCity }</td>
				<td>${TripCounselorInfo.price }</td>
				<c:if test="${TripCounselorInfo.payState =='0' }">
				<td>未支付</td>
				</c:if>
				<c:if test="${TripCounselorInfo.payState =='1' }">
				<td>已支付</td>
				</c:if>
				<c:if test="${TripCounselorInfo.payState =='2' }">
				<td>已取消</td>
				</c:if>
				<td>
				    <span ><a  href="${ctx}/trip/tTrip/check?tripCounselorId=${TripCounselorInfo.tripCounselorId} ">查看</a></span>
					<c:if test="${TripCounselorInfo.payState =='1' }">
					<span ><a  href="${ctx}/trip/tTrip/previewList?tripCounselorId=${TripCounselorInfo.tripCounselorId} ">行程规划</a></span>
					</c:if>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>